//
//  CreateRoom.swift
//  TestMeeting
//
//  Created by json on 2020/12/29.
//

import Foundation

struct CreateRoom: Encodable {
    
    public var type: Int = 3
    public var method: String = "CreateRoom"
    
}
struct JoinRoom: Encodable {
    
    public var roomId: String?
    public var method: String = "JoinRoom"
    
}
struct ExitRoom: Encodable {
    
    public var roomId: String?
    public var method: String = "ExitRoom"
    
}
struct CloseRoom: Encodable {
    
    public var roomId: String?
    public var method: String = "Close"
    
}
struct Ansowe: Encodable {
    
    public var sdp: String?
    public var method: String = "Answer"
    
}
// {"type":1,"target":"UserCreateRoom","arguments":[{"code":1,"result":"152"}]}
struct SingalResult: Decodable {
    public var code: Int
    public var result: String
    
}
struct SingalResult2: Decodable {
    public var code: Int
    public var result: IceCandidateResult
    
}
struct IceCandidateResult: Decodable {
    public var connectionId: String = ""
    public var sdpMid: String = ""
    public var candidate: String = ""
    public var usernameFragment: String = ""
    public var sdpMLineIndex: Int = 0
}

struct Ice: Encodable {
    public var connectionId: String = ""
    public var sdpMid: String = ""
    public var candidate: String = ""
    public var usernameFragment: String = ""
    public var sdpMLineIndex: Int = 0
}
